//package com.agileboot.admin.config.mq;
//
//import com.agileboot.domain.medicine.db.Medicine;
//import com.agileboot.domain.medicine.db.MedicineService;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import java.util.List;
//
//@Component
//public class MqListener {
//
//    @Autowired
//    private MedicineService medicineService;
//
//    @RabbitListener(queues = MqConstants.INSERT_QUEUE)
//    public void MedicineInsertOrUpdateListener(Medicine medicine) {
//        medicineService.save(medicine);
//    }
//
//    @RabbitListener(queues = MqConstants.DELETE_QUEUE)
//    public void MedicineDeleteListener(List<Long> id) {
//        medicineService.removeBatchByIds(id);
//    }
//
//}
